package com.benshou.bcss.common.j17common;

/**
 * @author <a href="mailto:wh1zper@qq.com">wh1zper</a>
 */
public interface Pagination {

    boolean paginationDisabled();

    long pageNo();

    long pageSize();

    Pagination DISABLED = new Pagination() {
        @Override
        public boolean paginationDisabled() {
            return true;
        }

        @Override
        public long pageNo() {
            throw new UnsupportedOperationException("Page no is unsupported");
        }

        @Override
        public long pageSize() {
            throw new UnsupportedOperationException("Page size is unsupported");
        }
    };
}
